<?php

class Model_LibraryAcl extends Zend_Acl {
    
    public function __construct() {
        $this->add(new Zend_Acl_Resource('authentification'));
        $this->add(new Zend_Acl_Resource('visiteur'));
        $this->add(new Zend_Acl_Resource('fraisforfait'));
        $this->add(new Zend_Acl_Resource('stats'));
        $this->add(new Zend_Acl_Resource('error'));
        
        $this->addRole(new Zend_Acl_Role('user'));
        $this->addRole(new Zend_Acl_Role('admin'), 'user');
        
        $this->allow('user', 'authentification' );
        $this->allow('user', 'visiteur', 'index' );
        $this->allow('user', 'visiteur', 'lister' );
        $this->allow('user', 'fraisforfait', 'index' );
        $this->allow('user', 'stats', 'cumulvisiteur');
        
        $this->allow('user', 'error' );
        $this->allow('admin', 'visiteur');
        $this->allow('admin', 'fraisforfait' );
        $this->allow('admin', 'stats');
        
//        $this->allow('admin', 'visiteur', 'gerer' );
    }
}
?>
